<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String ctx = request.getContextPath();
    request.setAttribute("ctx", ctx);
%>
<html>
<head>
    <title>POM 项目</title>
    <script src="js/jquery-1.8.2.min.js"></script>
    <script src="js/fileupload.js"></script>
    <link rel="stylesheet" href="bootstrap-4.6.0-dist/css/bootstrap.css">
    <link rel="stylesheet" href="css/img.css">
<%--    <link rel="stylesheet" href="css.css">--%>
</head>
<body>
<div>
        <jsp:include page="/layout/left.jsp"></jsp:include>
    </div>
</div>
<form action="list.do" method="post">
            <input type="hidden" name="cpage">
     发布日期:<input type="text" name="datatimeD" value="${map.datatimeD}">-
            <input type="text" name="datatimeX" value="${map.datatimeX}"><br>
     主版本号:<input type="text" name="zhubanbenhaoD" value="${map.zhubanbenhaoD}">-
            <input type="text" name="zhubanbenhaoX" value="${map.zhubanbenhaoX}"><br>
     从版本号:<input type="text" name="congbanbenhaoD" value="${map.congbanbenhaoD}">-
            <input type="text" name="congbanbenhaoX" value="${map.congbanbenhaoX}"><br>
     绘图文件:<input type="text" name="huituwenjian" value="${map.huituwenjian}"><br>
     制作人:<input type="text" name="zhizuorem" value="${map.zhizuorem}"><br>
     审核人:<input type="text" name="shengheren" value="${map.shengheren}"><br>
    <input type="submit" value="查询">
    <a href="list2.do">发布时间</a>
    <a href="list3.do">主版本号</a>
    <a href="list4.do">从版本号</a>
</form>
<table class="table table-dark">
    <tr>
        <td>发布时间</td>
        <td>品牌</td>
        <td>品类</td>
        <td>产品编号</td>
        <td>主版本号</td>
        <td>从版本号</td>
        <td>绘图文件</td>
        <td>总用量</td>
        <td>制作人</td>
        <td>审核人</td>
        <td>备注</td>
    </tr>
    <c:forEach items="${pageInfo.list}" var="li">
        <tr>
            <td>${li.datatime}</td>
            <td>${li.pinpainame}</td>
            <td>${li.pinlei}</td>
            <td>${li.changpinbianhao}</td>
            <td>${li.zhubanbenhao}</td>
            <td>${li.congbanbenhao}</td>
            <td>${li.huituwenjian}</td>
            <td>${li.zongyonglian}</td>
            <td>${li.zhizuorem}</td>
            <td>${li.shengheren}</td>
            <td>${li.beizhu}</td>
        </tr>
    </c:forEach>
    <tr>
        <td>
            <input type="button" value="首页" onclick="fenye(1)">
            <input type="button" value="上一页" onclick="fenye(${pageInfo.isFirstPage?1:pageInfo.prePage})">
            <input type="button" value="下一页" onclick="fenye(${pageInfo.isLastPage?pageInfo.pages:pageInfo.nextPage})">
            <input type="button" value="尾页" onclick="fenye(${pageInfo.pages})">
            <input type="button" value="添加" onclick="toadd()">

        </td>
    </tr>
</table>
</body>
<script>
    function fenye(cpage) {
        $("[name='cpage']").val(cpage)
        $("form").submit(cpage)
    }
    function toadd() {
        location="toadd.do"
    }
</script>
</html>
